import { _decorator, Component, Node } from 'cc';
import { Item } from './Item';
const { ccclass, property } = _decorator;

// 装备类，继承自物品类
@ccclass('Equipment')
export class Equipment extends Item {
    @property
    defense: number = 0;

    @property
    durability: number = 0;

    itemType: string='装备';

    constructor(name: string, description: string, defense: number, durability: number, quantity: number, itemType: string) {
        super(name, description, itemType, quantity); // 传递物品类型参数
        this.defense = defense;
        this.durability = durability;
    }
}


